package com.tuanzi.loan.web.lazy.xhh.settlementsystem;

import com.tuanzi.loan.business.service.xhh.settlementsystem.XhhSettlementCompanyService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.xhh.settlementsystem.XhhSettlementCompanyRequest;
import com.tuanzi.loan.vo.response.xhh.settlementsystem.XhhSettlementCompanyResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-01-25 20:17
 */
public class XhhSettlementCompanyLazyDataModel extends BaseLazyDataModel<XhhSettlementCompanyRequest, XhhSettlementCompanyResponse> {
    private XhhSettlementCompanyService xhhSettlementCompanyService = SpringContextHolder.getBean(XhhSettlementCompanyService.class);

    public XhhSettlementCompanyLazyDataModel(XhhSettlementCompanyRequest settlementCompanyRequest) {
        super(settlementCompanyRequest);
    }
    @Override
    protected Page<XhhSettlementCompanyResponse> doLoad(PageSearcher<XhhSettlementCompanyRequest> pageSearcher) {
        return xhhSettlementCompanyService.list(pageSearcher);
    }
}
